<?php
namespace Login\Controller;
use Think\Controller;
//use Think\PHPExcel;

class LogoutController extends Controller {
    //ThinkPHP的构造函数
    public function _initialize() {
        header("Content-type:text/html;charset=utf-8");
    }

    //退出登录
    public function index(){
        session('admin_id',null);
        session('admin_group_id',null);
        cookie('admin_id',null);
        cookie('admin_group_id',null);
        echo "<script>window.location.href='/login'</script>";exit;
    }

}
